package com.qfmy.web.config;

import com.qfmy.web.interactor.LoginInterceptor;
import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author: 廖志伟
 * @date: 2024-11-28
 * @Description: 登录拦截器配置
 */
@Component
@SuppressWarnings("all")
public class LoginConfig implements WebMvcConfigurer {

    //配置拦截器
    @Override
    public void addInterceptors(@NotNull InterceptorRegistry registry) {
        registry.addInterceptor(new LoginInterceptor()).addPathPatterns("/**")
                .excludePathPatterns("/login/**");
    }
}
